package com.dzsw.javabase.regx;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class QuotationSample {

    public static void main(String[] args) {
        String regx = "['\"](.*?)['\"]";
        String str = "hasAuthority('11d4dfsaf1')";

        Pattern pattern = Pattern.compile(regx);
        Matcher matcher = pattern.matcher(str);
        while (matcher.find()) {
            System.out.println(matcher.group(1));
        }
    }
}
